const routes = [
  // 区域功能配置
  {
    name: "areaFunctionList", // 列表
    path: "/areaFunction/list",
    component: "/areaFunction/list"
  },
  {
    name: "areaFunctionAdd", // 新增
    path: "/areaFunction/list/add",
    component: "/areaFunction/add",
    hideInMenu: true,
  },
  {
    name: "areaFunctionEdit", // 编辑
    path: "/areaFunction/list/edit",
    component: "/areaFunction/add",
    hideInMenu: true,
  },
  // 特殊用户管理
  {
    name: "specialuser",
    path: "/specialuser/list",
    component: "/specialuser/list"
  },
  // 柜体投递白名单查询
  {
    name: "cabinetDeliveryWhitelist",
    path: "/cabinetDeliveryWhitelist/list",
    component: "/cabinetDeliveryWhitelist/list"
  },
  // 取件收费白名单
  {
    name: "chargeList",
    path: "/chargeList/list",
    component: "/chargeList/list"
  },
]

const business = routes.map((route: any) => {
  route.path = `/business${route.path}`;
  route.component = `./business${route.component}`;
  return route;
}, {});

export default [
  {
    name: "business",
    path: "/business",
    icon: "smile",
    routes: [
      ...business,
      {
        component: "./404"
      }
    ]
  }
]